home *** CD-ROM | disk | FTP | other *** search
- SYNC(3I) Last changed: 4-13-99
-
-
- NNAAMMEE
- LLOOCCKK__RREELLEEAASSEE, SSYYNNCCHHRROONNIIZZEE, AANNDD__AANNDD__FFEETTCCHH, AADDDD__AANNDD__FFEETTCCHH,
- CCOOMMPPAARREE__AANNDD__SSWWAAPP, FFEETTCCHH__AANNDD__AADDDD, FFEETTCCHH__AANNDD__AANNDD, FFEETTCCHH__AANNDD__NNAANNDD,
- FFEETTCCHH__AANNDD__OORR, FFEETTCCHH__AANNDD__SSUUBB, FFEETTCCHH__AANNDD__XXOORR, LLOOCCKK__TTEESSTT__AANNDD__SSEETT,
- NNAANNDD__AANNDD__FFEETTCCHH, OORR__AANNDD__FFEETTCCHH, SSUUBB__AANNDD__FFEETTCCHH, XXOORR__AANNDD__FFEETTCCHH, - Fortran
- synchronization intrinsics for multiprocessing
-
- SSYYNNOOPPSSIISS
- CCAALLLL LLOOCCKK__RREELLEEAASSEE (([II==]_i))
- CCAALLLL SSYYNNCCHHRROONNIIZZEE
- AADDDD__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
- AANNDD__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
- CCOOMMPPAARREE__AANNDD__SSWWAAPP (([II==]_i,, [JJ==]_j,, [KK==]_k))
- FFEETTCCHH__AANNDD__AADDDD (([II==]_i,, [JJ==]_j))
- FFEETTCCHH__AANNDD__AANNDD (([II==]_i,, [JJ==]_j))
- FFEETTCCHH__AANNDD__NNAANNDD (([II==]_i,, [JJ==]_j))
- FFEETTCCHH__AANNDD__OORR (([II==]_i,, [JJ==]_j))
- FFEETTCCHH__AANNDD__SSUUBB (([II==]_i,, [JJ==]_j))
- FFEETTCCHH__AANNDD__XXOORR (([II==]_i,, [JJ==]_j))
- LLOOCCKK__TTEESSTT__AANNDD__SSEETT (([II==]_i,, [JJ==]_j))
- NNAANNDD__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
- OORR__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
- SSUUBB__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
- XXOORR__AANNDD__FFEETTCCHH (([II==_i,, [JJ==]_j))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- MIPSpro 7 Fortran 90
-
- SSTTAANNDDAARRDDSS
- Fortran extension
-
- DDEESSCCRRIIPPTTIIOONN
- The synchronization intrinsics provide a variety of synchronization
- operations. LLOOCCKK__RREELLEEAASSEE and SSYYNNCCHHRROONNIIZZEE are intrinsic subroutines;
- all the others are elemental intrinsic functions. These intrinsics
- accept the following arguments:
-
- _i An integer. _i must be KIND=4 or KIND=8.
-
- _j An integer. _j must be the same kind type as _i.
-
- _k An integer. _k must be the same kind type as _i and _j.
-
- The memory barrier intrinsics perform either an acquire barrier,
- release barrier, or full barrier operation. The operation type and
- the intrinsics that accomplish that type of task are as follows:
-
- TTyyppee DDeessccrriippttiioonn
-
- Acquire barrier Prevents the movement of memory references to
- visible data from after the intrinsic (in program
- order) to before the intrinsic. This behavior is
- desirable for lock-acquire operations.
-
- Acquire barrier operations can be accomplished by
- using the LLOOCCKK__TTEESSTT__AANNDD__SSEETT intrinsic subroutine.
- This subroutine atomically stores the value of the
- second argument into the first argument. It
- returns the old value of the first argument.
-
- Release barrier Prevents the movement of memory references to
- visible data from before the intrinsic (in program
- order) to after the intrinsic. This behavior is
- desirable for lock-release operations.
-
- Release barrier operations can be accomplished by
- using the LLOOCCKK__RREELLEEAASSEE intrinsic subroutine. This
- subroutine sets its argument to zero.
-
- Full barrier Prevents the movement of memory references to
- visible data past the intrinsic in either
- direction. These act as both an acquire and a
- release barrier. A barrier only restricts the
- movement of memory references to visible data
- across the intrinsic operation. Between
- synchronization operations (or in their absence),
- memory references to visible data can be freely
- reordered, subject to the usual data-dependence
- constraints.
-
- Full barrier operations are divided into the
- following groups:
-
- * Atomic FFEETTCCHH__AANNDD___o_p operations. The
- FFEETTCCHH__AANNDD__AADDDD, FFEETTCCHH__AANNDD__AANNDD, FFEETTCCHH__AANNDD__NNAANNDD,
- FFEETTCCHH__AANNDD__OORR, FFEETTCCHH__AANNDD__SSUUBB, and FFEETTCCHH__AANNDD__XXOORR
- intrinsic functions perform the operation with
- the second argument on the first argument. They
- return the old value of the first argument.
-
- * Atomic _o_p__AANNDD__FFEETTCCHH operations. The
- AADDDD__AANNDD__FFEETTCCHH, AANNDD__AANNDD__FFEETTCCHH, NNAANNDD__AANNDD__FFEETTCCHH,
- OORR__AANNDD__FFEETTCCHH, SSUUBB__AANNDD__FFEETTCCHH, and XXOORR__AANNDD__FFEETTCCHH
- intrinsic functions perform the operation with
- the second argument on the first argument. They
- return the new value of the second argument.
-
- * Atomic CCOOMMPPAARREE__AANNDD__SSWWAAPP operation. The
- CCOOMMPPAARREE__AANNDD__SSWWAAPP intrinsic function compares the
- value of the first argument to the value of the
- second. If they are equal, the value of the
- third argument is stored into the first and the
- return value is TRUE. Otherwise, the return
- value is FALSE.
-
- * Atomic SSYYNNCCHHRROONNIIZZEE operation. This is performed
- with the SSYYNNCCHHRROONNIIZZEE intrinsic subroutine.
-
- RREETTUURRNN VVAALLUUEESS
- The CCOOMMPPAARREE__AANNDD__SSWWAAPP intrinsic function returns TRUE or FALSE. All
- other intrinsic functions return a value of type integer. The integer
- values returned are of the same kind type as the arguments provided.
-
- NNOOTTEESS
- Each intrinsic possesses two key properties:
-
- * The operation performed is guaranteed to be atomic. This is
- typically achieved by implementing the operation using a sequence of
- load-linked/store-conditional instructions in a loop.
-
- * Associated with each intrinsic are certain memory barrier properties
- that restrict the movement of memory references to visible data
- across the intrinsic operation (by either the compiler or the
- processor).
-
- A _v_i_s_i_b_l_e _m_e_m_o_r_y _r_e_f_e_r_e_n_c_e is a reference to a data object potentially
- accessible by another thread executing in the same shared address
- space. A visible data object can be one of the following:
-
- * C/C++ global data
-
- * Fortran COMMON data
-
- * VOLATILE data
-
- * Static data (either file-scope or function-scope)
-
- * Data accessible through function parameters
-
- * AUTOMATIC data (local-scope) that has had its address taken and
- assigned to some object that is visible (recursively).
-
- CCAAUUTTIIOONNSS
- Conditional execution of a synchronization intrinsic, such as within
- an IF or WHILE block, does not prevent the movement of memory
- references to visible data past the overall IF or WHILE construct.
-
- SSEEEE AALLSSOO
- This man page is available only online.
-